package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.SubsidyPaymentApplicationMapper;
import com.traffic.domain.SubsidyPaymentApplication;
import com.traffic.service.ISubsidyPaymentApplicationService;

/**
 * 支付申请Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-12
 */
@Service
public class SubsidyPaymentApplicationServiceImpl implements ISubsidyPaymentApplicationService 
{
    @Autowired
    private SubsidyPaymentApplicationMapper subsidyPaymentApplicationMapper;

    /**
     * 查询支付申请
     * 
     * @param id 支付申请主键
     * @return 支付申请
     */
    @Override
    public SubsidyPaymentApplication selectSubsidyPaymentApplicationById(Long id)
    {
        return subsidyPaymentApplicationMapper.selectSubsidyPaymentApplicationById(id);
    }

    /**
     * 查询支付申请列表
     * 
     * @param subsidyPaymentApplication 支付申请
     * @return 支付申请
     */
    @Override
    public List<SubsidyPaymentApplication> selectSubsidyPaymentApplicationList(SubsidyPaymentApplication subsidyPaymentApplication)
    {
        return subsidyPaymentApplicationMapper.selectSubsidyPaymentApplicationList(subsidyPaymentApplication);
    }

    /**
     * 新增支付申请
     * 
     * @param subsidyPaymentApplication 支付申请
     * @return 结果
     */
    @Override
    public int insertSubsidyPaymentApplication(SubsidyPaymentApplication subsidyPaymentApplication)
    {
        subsidyPaymentApplication.setCreateTime(DateUtils.getNowDate());
        return subsidyPaymentApplicationMapper.insertSubsidyPaymentApplication(subsidyPaymentApplication);
    }

    /**
     * 修改支付申请
     * 
     * @param subsidyPaymentApplication 支付申请
     * @return 结果
     */
    @Override
    public int updateSubsidyPaymentApplication(SubsidyPaymentApplication subsidyPaymentApplication)
    {
        return subsidyPaymentApplicationMapper.updateSubsidyPaymentApplication(subsidyPaymentApplication);
    }

    /**
     * 批量删除支付申请
     * 
     * @param ids 需要删除的支付申请主键
     * @return 结果
     */
    @Override
    public int deleteSubsidyPaymentApplicationByIds(Long[] ids)
    {
        return subsidyPaymentApplicationMapper.deleteSubsidyPaymentApplicationByIds(ids);
    }

    /**
     * 删除支付申请信息
     * 
     * @param id 支付申请主键
     * @return 结果
     */
    @Override
    public int deleteSubsidyPaymentApplicationById(Long id)
    {
        return subsidyPaymentApplicationMapper.deleteSubsidyPaymentApplicationById(id);
    }
}
